Robert McNeel

Why does VBScript have Null, Nothing and Empty, and what are the differences between them? When you declare a variable in VBScript, the variable’s value before the first assignment is undefined, or Empty. Dim varValue ‘ Empty value So basically, Empty says I am an uninitialized variant. If you need to detect whether a variable actually is an empty variant and not a string or a number, you can use IsEmpty. Alternatively, you could use TypeName or VarType, but I prefer IsEmpty. Nothing is similar to Empty but subtly different. Empty says I am an uninitialized variant, Nothing says I am an object reference that refers to no object. Objects … Continue reading Robert McNeel